﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Rendering.AsyncGPUReadback
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using System.Runtime.CompilerServices;
using Unity.Collections;
using UnityEngine.Bindings;
using UnityEngine.Experimental.Rendering;

#nullable disable
namespace UnityEngine.Rendering
{
  /// <summary>
  ///   <para>Allows the asynchronous read back of GPU resources.</para>
  /// </summary>
  [StaticAccessor("AsyncGPUReadbackManager::GetInstance()", StaticAccessorType.Dot)]
  public static class AsyncGPUReadback
  {
    internal static void ValidateFormat(Texture src, GraphicsFormat dstformat)
    {
      GraphicsFormat format = GraphicsFormatUtility.GetFormat(src);
      if (SystemInfo.IsFormatSupported(format, FormatUsage.ReadPixels))
        return;
      Debug.LogError((object) string.Format("'{0}' doesn't support ReadPixels usage on this platform. Async GPU readback failed.", (object) format));
    }

    /// <summary>
    ///   <para>Waits until the completion of every request.</para>
    /// </summary>
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern void WaitAllRequests();

    public static unsafe AsyncGPUReadbackRequest Request(
      ComputeBuffer src,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      AsyncGPUReadbackRequest buffer1 = AsyncGPUReadback.Request_Internal_ComputeBuffer_1(src, (AsyncRequestNativeArrayData*) null);
      buffer1.SetScriptingCallback(callback);
      return buffer1;
    }

    public static unsafe AsyncGPUReadbackRequest Request(
      ComputeBuffer src,
      int size,
      int offset,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      AsyncGPUReadbackRequest buffer2 = AsyncGPUReadback.Request_Internal_ComputeBuffer_2(src, size, offset, (AsyncRequestNativeArrayData*) null);
      buffer2.SetScriptingCallback(callback);
      return buffer2;
    }

    public static unsafe AsyncGPUReadbackRequest Request(
      GraphicsBuffer src,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_GraphicsBuffer_1(src, (AsyncRequestNativeArrayData*) null);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static unsafe AsyncGPUReadbackRequest Request(
      GraphicsBuffer src,
      int size,
      int offset,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_GraphicsBuffer_2(src, size, offset, (AsyncRequestNativeArrayData*) null);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static unsafe AsyncGPUReadbackRequest Request(
      Texture src,
      int mipIndex = 0,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_1(src, mipIndex, (AsyncRequestNativeArrayData*) null);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static AsyncGPUReadbackRequest Request(
      Texture src,
      int mipIndex,
      TextureFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      return AsyncGPUReadback.Request(src, mipIndex, GraphicsFormatUtility.GetGraphicsFormat(dstFormat, QualitySettings.activeColorSpace == ColorSpace.Linear), callback);
    }

    public static unsafe AsyncGPUReadbackRequest Request(
      Texture src,
      int mipIndex,
      GraphicsFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      AsyncGPUReadback.ValidateFormat(src, dstFormat);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_2(src, mipIndex, dstFormat, (AsyncRequestNativeArrayData*) null);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static unsafe AsyncGPUReadbackRequest Request(
      Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_3(src, mipIndex, x, width, y, height, z, depth, (AsyncRequestNativeArrayData*) null);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static AsyncGPUReadbackRequest Request(
      Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      TextureFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      return AsyncGPUReadback.Request(src, mipIndex, x, width, y, height, z, depth, GraphicsFormatUtility.GetGraphicsFormat(dstFormat, QualitySettings.activeColorSpace == ColorSpace.Linear), callback);
    }

    public static unsafe AsyncGPUReadbackRequest Request(
      Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      GraphicsFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
    {
      AsyncGPUReadback.ValidateFormat(src, dstFormat);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_4(src, mipIndex, x, width, y, height, z, depth, dstFormat, (AsyncRequestNativeArrayData*) null);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeArray<T>(
      ref NativeArray<T> output,
      ComputeBuffer src,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest buffer1 = AsyncGPUReadback.Request_Internal_ComputeBuffer_1(src, &andCheckAccess);
      buffer1.SetScriptingCallback(callback);
      return buffer1;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeArray<T>(
      ref NativeArray<T> output,
      ComputeBuffer src,
      int size,
      int offset,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest buffer2 = AsyncGPUReadback.Request_Internal_ComputeBuffer_2(src, size, offset, &andCheckAccess);
      buffer2.SetScriptingCallback(callback);
      return buffer2;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeArray<T>(
      ref NativeArray<T> output,
      GraphicsBuffer src,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_GraphicsBuffer_1(src, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeArray<T>(
      ref NativeArray<T> output,
      GraphicsBuffer src,
      int size,
      int offset,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_GraphicsBuffer_2(src, size, offset, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeArray<T>(
      ref NativeArray<T> output,
      Texture src,
      int mipIndex = 0,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_1(src, mipIndex, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static AsyncGPUReadbackRequest RequestIntoNativeArray<T>(
      ref NativeArray<T> output,
      Texture src,
      int mipIndex,
      TextureFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      return AsyncGPUReadback.RequestIntoNativeArray<T>(ref output, src, mipIndex, GraphicsFormatUtility.GetGraphicsFormat(dstFormat, QualitySettings.activeColorSpace == ColorSpace.Linear), callback);
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeArray<T>(
      ref NativeArray<T> output,
      Texture src,
      int mipIndex,
      GraphicsFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncGPUReadback.ValidateFormat(src, dstFormat);
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_2(src, mipIndex, dstFormat, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static AsyncGPUReadbackRequest RequestIntoNativeArray<T>(
      ref NativeArray<T> output,
      Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      TextureFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      return AsyncGPUReadback.RequestIntoNativeArray<T>(ref output, src, mipIndex, x, width, y, height, z, depth, GraphicsFormatUtility.GetGraphicsFormat(dstFormat, QualitySettings.activeColorSpace == ColorSpace.Linear), callback);
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeArray<T>(
      ref NativeArray<T> output,
      Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      GraphicsFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncGPUReadback.ValidateFormat(src, dstFormat);
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_4(src, mipIndex, x, width, y, height, z, depth, dstFormat, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeSlice<T>(
      ref NativeSlice<T> output,
      ComputeBuffer src,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest buffer1 = AsyncGPUReadback.Request_Internal_ComputeBuffer_1(src, &andCheckAccess);
      buffer1.SetScriptingCallback(callback);
      return buffer1;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeSlice<T>(
      ref NativeSlice<T> output,
      ComputeBuffer src,
      int size,
      int offset,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest buffer2 = AsyncGPUReadback.Request_Internal_ComputeBuffer_2(src, size, offset, &andCheckAccess);
      buffer2.SetScriptingCallback(callback);
      return buffer2;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeSlice<T>(
      ref NativeSlice<T> output,
      GraphicsBuffer src,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_GraphicsBuffer_1(src, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeSlice<T>(
      ref NativeSlice<T> output,
      GraphicsBuffer src,
      int size,
      int offset,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_GraphicsBuffer_2(src, size, offset, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeSlice<T>(
      ref NativeSlice<T> output,
      Texture src,
      int mipIndex = 0,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_1(src, mipIndex, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static AsyncGPUReadbackRequest RequestIntoNativeSlice<T>(
      ref NativeSlice<T> output,
      Texture src,
      int mipIndex,
      TextureFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      return AsyncGPUReadback.RequestIntoNativeSlice<T>(ref output, src, mipIndex, GraphicsFormatUtility.GetGraphicsFormat(dstFormat, QualitySettings.activeColorSpace == ColorSpace.Linear), callback);
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeSlice<T>(
      ref NativeSlice<T> output,
      Texture src,
      int mipIndex,
      GraphicsFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncGPUReadback.ValidateFormat(src, dstFormat);
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_2(src, mipIndex, dstFormat, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    public static AsyncGPUReadbackRequest RequestIntoNativeSlice<T>(
      ref NativeSlice<T> output,
      Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      TextureFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      return AsyncGPUReadback.RequestIntoNativeSlice<T>(ref output, src, mipIndex, x, width, y, height, z, depth, GraphicsFormatUtility.GetGraphicsFormat(dstFormat, QualitySettings.activeColorSpace == ColorSpace.Linear), callback);
    }

    public static unsafe AsyncGPUReadbackRequest RequestIntoNativeSlice<T>(
      ref NativeSlice<T> output,
      Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      GraphicsFormat dstFormat,
      Action<AsyncGPUReadbackRequest> callback = null)
      where T : struct
    {
      AsyncGPUReadback.ValidateFormat(src, dstFormat);
      AsyncRequestNativeArrayData andCheckAccess = AsyncRequestNativeArrayData.CreateAndCheckAccess<T>(output);
      AsyncGPUReadbackRequest gpuReadbackRequest = AsyncGPUReadback.Request_Internal_Texture_4(src, mipIndex, x, width, y, height, z, depth, dstFormat, &andCheckAccess);
      gpuReadbackRequest.SetScriptingCallback(callback);
      return gpuReadbackRequest;
    }

    [NativeMethod("Request")]
    private static unsafe AsyncGPUReadbackRequest Request_Internal_ComputeBuffer_1(
      [NotNull("ArgumentNullException")] ComputeBuffer buffer,
      AsyncRequestNativeArrayData* data)
    {
      AsyncGPUReadbackRequest ret;
      AsyncGPUReadback.Request_Internal_ComputeBuffer_1_Injected(buffer, data, out ret);
      return ret;
    }

    [NativeMethod("Request")]
    private static unsafe AsyncGPUReadbackRequest Request_Internal_ComputeBuffer_2(
      [NotNull("ArgumentNullException")] ComputeBuffer src,
      int size,
      int offset,
      AsyncRequestNativeArrayData* data)
    {
      AsyncGPUReadbackRequest ret;
      AsyncGPUReadback.Request_Internal_ComputeBuffer_2_Injected(src, size, offset, data, out ret);
      return ret;
    }

    [NativeMethod("Request")]
    private static unsafe AsyncGPUReadbackRequest Request_Internal_GraphicsBuffer_1(
      [NotNull("ArgumentNullException")] GraphicsBuffer buffer,
      AsyncRequestNativeArrayData* data)
    {
      AsyncGPUReadbackRequest ret;
      AsyncGPUReadback.Request_Internal_GraphicsBuffer_1_Injected(buffer, data, out ret);
      return ret;
    }

    [NativeMethod("Request")]
    private static unsafe AsyncGPUReadbackRequest Request_Internal_GraphicsBuffer_2(
      [NotNull("ArgumentNullException")] GraphicsBuffer src,
      int size,
      int offset,
      AsyncRequestNativeArrayData* data)
    {
      AsyncGPUReadbackRequest ret;
      AsyncGPUReadback.Request_Internal_GraphicsBuffer_2_Injected(src, size, offset, data, out ret);
      return ret;
    }

    [NativeMethod("Request")]
    private static unsafe AsyncGPUReadbackRequest Request_Internal_Texture_1(
      [NotNull("ArgumentNullException")] Texture src,
      int mipIndex,
      AsyncRequestNativeArrayData* data)
    {
      AsyncGPUReadbackRequest ret;
      AsyncGPUReadback.Request_Internal_Texture_1_Injected(src, mipIndex, data, out ret);
      return ret;
    }

    [NativeMethod("Request")]
    private static unsafe AsyncGPUReadbackRequest Request_Internal_Texture_2(
      [NotNull("ArgumentNullException")] Texture src,
      int mipIndex,
      GraphicsFormat dstFormat,
      AsyncRequestNativeArrayData* data)
    {
      AsyncGPUReadbackRequest ret;
      AsyncGPUReadback.Request_Internal_Texture_2_Injected(src, mipIndex, dstFormat, data, out ret);
      return ret;
    }

    [NativeMethod("Request")]
    private static unsafe AsyncGPUReadbackRequest Request_Internal_Texture_3(
      [NotNull("ArgumentNullException")] Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      AsyncRequestNativeArrayData* data)
    {
      AsyncGPUReadbackRequest ret;
      AsyncGPUReadback.Request_Internal_Texture_3_Injected(src, mipIndex, x, width, y, height, z, depth, data, out ret);
      return ret;
    }

    [NativeMethod("Request")]
    private static unsafe AsyncGPUReadbackRequest Request_Internal_Texture_4(
      [NotNull("ArgumentNullException")] Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      GraphicsFormat dstFormat,
      AsyncRequestNativeArrayData* data)
    {
      AsyncGPUReadbackRequest ret;
      AsyncGPUReadback.Request_Internal_Texture_4_Injected(src, mipIndex, x, width, y, height, z, depth, dstFormat, data, out ret);
      return ret;
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern unsafe void Request_Internal_ComputeBuffer_1_Injected(
      ComputeBuffer buffer,
      AsyncRequestNativeArrayData* data,
      out AsyncGPUReadbackRequest ret);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern unsafe void Request_Internal_ComputeBuffer_2_Injected(
      ComputeBuffer src,
      int size,
      int offset,
      AsyncRequestNativeArrayData* data,
      out AsyncGPUReadbackRequest ret);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern unsafe void Request_Internal_GraphicsBuffer_1_Injected(
      GraphicsBuffer buffer,
      AsyncRequestNativeArrayData* data,
      out AsyncGPUReadbackRequest ret);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern unsafe void Request_Internal_GraphicsBuffer_2_Injected(
      GraphicsBuffer src,
      int size,
      int offset,
      AsyncRequestNativeArrayData* data,
      out AsyncGPUReadbackRequest ret);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern unsafe void Request_Internal_Texture_1_Injected(
      Texture src,
      int mipIndex,
      AsyncRequestNativeArrayData* data,
      out AsyncGPUReadbackRequest ret);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern unsafe void Request_Internal_Texture_2_Injected(
      Texture src,
      int mipIndex,
      GraphicsFormat dstFormat,
      AsyncRequestNativeArrayData* data,
      out AsyncGPUReadbackRequest ret);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern unsafe void Request_Internal_Texture_3_Injected(
      Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      AsyncRequestNativeArrayData* data,
      out AsyncGPUReadbackRequest ret);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern unsafe void Request_Internal_Texture_4_Injected(
      Texture src,
      int mipIndex,
      int x,
      int width,
      int y,
      int height,
      int z,
      int depth,
      GraphicsFormat dstFormat,
      AsyncRequestNativeArrayData* data,
      out AsyncGPUReadbackRequest ret);
  }
}
